const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const router = require('./router/index');
const cors = require('cors') 

app.listen(7777,() => {
  console.log(7777);
})
app.use(express.static('public'))
app.use(cors())
app.use(bodyParser.json());
// 创建 application/x-www-form-urlencoded 编码解析    顺序一定要早use(router之前【h t t r d d w q)
app.use(bodyParser.urlencoded({ extended: false }));
app.use(router);
